import java.util.HashSet;

public class Text {
    class Node{
        int key;
        int value;
        Node next;
    }
    Node[] array = new Node[10];
    private void reSize() {
        Node[] newArray = new Node[array.length*2];
//处理重新哈希
        for (int i = 0; i < array.length; i++) {
            Node cur = array[i];
            while (cur != null) {
                int index = cur.key % newArray.length;
//记录下来 之前的cur.next
                Node curNext = cur.next;
//进行头插法,插入到新数组
                cur.next = newArray[index];
                newArray[index] = cur;
                cur = curNext;
            }
        }
//把数据给到原数组 array
        array = newArray;
    }


}
